/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.giant.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author taticay
 */
@Entity
@Table(name = "in_global_code")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "InGlobalCode.findAll", query = "SELECT i FROM InGlobalCode i"),
    @NamedQuery(name = "InGlobalCode.findByIdGlobalCode", query = "SELECT i FROM InGlobalCode i WHERE i.idGlobalCode = :idGlobalCode"),
    @NamedQuery(name = "InGlobalCode.findByCode", query = "SELECT i FROM InGlobalCode i WHERE i.code = :code"),
    @NamedQuery(name = "InGlobalCode.findByRegion", query = "SELECT i FROM InGlobalCode i WHERE i.region = :region"),
    @NamedQuery(name = "InGlobalCode.findByGSCdescription", query = "SELECT i FROM InGlobalCode i WHERE i.gSCdescription = :gSCdescription"),
    @NamedQuery(name = "InGlobalCode.findByModelType", query = "SELECT i FROM InGlobalCode i WHERE i.modelType = :modelType"),
    @NamedQuery(name = "InGlobalCode.findByStatus", query = "SELECT i FROM InGlobalCode i WHERE i.status = :status")})
public class InGlobalCode implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_global_code")
    private Integer idGlobalCode;
    @Basic(optional = false)
    @NotNull
    @Column(name = "code")
    private int code;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "region")
    private String region;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "GSC_description")
    private String gSCdescription;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "model_type")
    private String modelType;
    @Basic(optional = false)
    @NotNull
    @Column(name = "status")
    private boolean status;

    public InGlobalCode() {
    }

    public InGlobalCode(Integer idGlobalCode) {
        this.idGlobalCode = idGlobalCode;
    }

    public InGlobalCode(Integer idGlobalCode, int code, String region, String gSCdescription, String modelType, boolean status) {
        this.idGlobalCode = idGlobalCode;
        this.code = code;
        this.region = region;
        this.gSCdescription = gSCdescription;
        this.modelType = modelType;
        this.status = status;
    }

    public Integer getIdGlobalCode() {
        return idGlobalCode;
    }

    public void setIdGlobalCode(Integer idGlobalCode) {
        this.idGlobalCode = idGlobalCode;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getGSCdescription() {
        return gSCdescription;
    }

    public void setGSCdescription(String gSCdescription) {
        this.gSCdescription = gSCdescription;
    }

    public String getModelType() {
        return modelType;
    }

    public void setModelType(String modelType) {
        this.modelType = modelType;
    }

    public boolean getStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idGlobalCode != null ? idGlobalCode.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InGlobalCode)) {
            return false;
        }
        InGlobalCode other = (InGlobalCode) object;
        if ((this.idGlobalCode == null && other.idGlobalCode != null) || (this.idGlobalCode != null && !this.idGlobalCode.equals(other.idGlobalCode))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.giant.entities.InGlobalCode[ idGlobalCode=" + idGlobalCode + " ]";
    }
    
}
